﻿<Page x:Class="WinChrome.VS2012Demo.Pages.DemoPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:ViewModel="clr-namespace:WinChrome.VS2012Demo.ViewModel" mc:Ignorable="d" 
    d:DesignWidth="300" d:DataContext="{d:DesignInstance Type={x:Type ViewModel:DemoPageViewModel}}"
      Foreground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
    Title="DemoPage">
    <Page.Resources>
        <Style x:Key="colourButtonStyle" TargetType="Button">
            <Setter Property="Width" Value="32"/>
            <Setter Property="Height" Value="32"/>
            <Setter Property="Command" Value="{Binding SetColorCommand}" />
            <Setter Property="CommandParameter" Value="{Binding RelativeSource={RelativeSource Self}, Path=Background.Color}"/>
            <Setter Property="Margin" Value="3"/>            
        </Style>
        <Style x:Key="theme" TargetType="Border">
            <Setter Property="Width" Value="32"/>
            <Setter Property="Height" Value="32"/>
            <Setter Property="Margin" Value="3"/>
        </Style>
    </Page.Resources>
    <StackPanel>
        <StackPanel Orientation="Horizontal" VerticalAlignment="Top" >
            <TextBlock VerticalAlignment="Center" Margin="6,0">Pick a colour</TextBlock>
            <Button Background="LimeGreen" Style="{StaticResource colourButtonStyle}"/>
            <Button Background="Purple" Style="{StaticResource colourButtonStyle}"/>
            <Button Background="#CA5100" Style="{StaticResource colourButtonStyle}" />
            <Button Background="{DynamicResource {x:Static SystemColors.HotTrackBrushKey}}" Style="{StaticResource colourButtonStyle}"/>
        </StackPanel>
        <StackPanel Orientation="Horizontal" VerticalAlignment="Top" >
            <TextBlock VerticalAlignment="Center" Margin="6,0">Theme colors</TextBlock>
            <Border Background="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}" Style="{StaticResource theme}"/>
            <Border Background="{DynamicResource {x:Static SystemColors.ControlLightBrushKey}}" Style="{StaticResource theme}"/>
            <Border Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" Style="{StaticResource theme}"/>
            <Border Background="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}" Style="{StaticResource theme}"/>
            <Border Background="{DynamicResource {x:Static SystemColors.ControlDarkDarkBrushKey}}" Style="{StaticResource theme}"/>
        </StackPanel>
        <StackPanel>
            <Border Height="300" BorderBrush="Black" BorderThickness="0.75" Margin="12" Padding="12" Background="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}">
                <TextBlock FontSize="16">Pretend this is lots of text</TextBlock>
            </Border>
        </StackPanel>
        <Grid>
            <Button HorizontalAlignment="Right" Command="{Binding GoNextCommand}" Content="Next" Margin="12"/>
        </Grid>
    </StackPanel>
</Page>
